package com.ronnaces.loong.codegen.api.mapper;

import com.ronnaces.loong.codegen.api.entity.Template;
import com.ronnaces.loong.codegen.api.entity.TemplateExample;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

public interface TemplateMapper {

    void createTable();

    Template selectByName(@Param("name") String name);

    List<Template> selectRecently(@Param("count") Integer count);

    List<Template> selectList();

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table template
     *
     * @mbg.generated
     */
    long countByExample(TemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table template
     *
     * @mbg.generated
     */
    int deleteByExample(TemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table template
     *
     * @mbg.generated
     */
    int deleteByPrimaryKey(Integer id);

    int deleteById(String id);

    void deleteBatchIds(Set<String> selectedIdList);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table template
     *
     * @mbg.generated
     */
    int insert(Template row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table template
     *
     * @mbg.generated
     */
    int insertSelective(Template row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table template
     *
     * @mbg.generated
     */
    List<Template> selectByExample(TemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table template
     *
     * @mbg.generated
     */
    Template selectByPrimaryKey(Integer id);

    Template selectById(String id);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table template
     *
     * @mbg.generated
     */
    int updateByExampleSelective(@Param("row") Template row, @Param("example") TemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table template
     *
     * @mbg.generated
     */
    int updateByExample(@Param("row") Template row, @Param("example") TemplateExample example);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table template
     *
     * @mbg.generated
     */
    int updateByPrimaryKeySelective(Template row);

    /**
     * This method was generated by MyBatis Generator.
     * This method corresponds to the database table template
     *
     * @mbg.generated
     */
    int updateByPrimaryKey(Template row);

    void updateById(Template template);

}